package com.example.springsecurity.mapper;

import com.example.springsecurity.pojo.MyUser;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper {
    // 根据用户名查询用户实体
    @Select("select * from users where username = #{username}")
    public MyUser getUserByUsername(String username);
    @Insert("insert into users(username,password) values (#{username},#{password})")
    public void insertUser(MyUser user);
    @Update("update users set password=#{password} where username=#{username}")
    public void updatePasswordByUsername(@Param("username") String username,@Param("password")String password);


}
